import math
inp=input().split(' ')
a=float(inp[0])
b=float(inp[1])
n=int(inp[2])

def fun(x):
    return math.log(x)

def complex_trapezoid(a,b,n):
    sum=0
    h=(b-a)/n
    sum+=fun(a)+fun(b)
    for i in range(1,n):
        sum+=2*fun(a+i*h)
    sum*=h/2
    return sum

print("%.5f"%complex_trapezoid(a,b,n))
